#ifndef _TASKQUEUE__H
#define _TASKQUEUE__H
#include <queue>
#include <mutex>
#include <condition_variable>

using namespace std;
class Task;
using ElemType = Task *;

class TaskQueue{
   private:
   size_t _queSize;
   queue<ElemType> _que;
   mutex _mutex;
   condition_variable _notFull;
   condition_variable _notEmpty;
   bool flag = true;
   public:
   TaskQueue(size_t queSize);
   ~TaskQueue();
   void push(ElemType );
   ElemType pop();
   bool full();
   bool empty();
   void wakeup();
};

#endif

